package com.tuanzi.loan.vo.view.product;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import lombok.Data;

@Data
public class LoanProductModelView implements Serializable {

	public static final String SEPARATOR = "0x80072EE2";

	private static final long serialVersionUID = -8410971006286081875L;

	private Integer type;

	private String label;

	private String content;

	private String text;

	private String imgUrl;

	private String imgText;

	private String imgTextUrl;

	private Date date;

	private Integer isTrue;

	private List<OneListObject> oneListObjects = new ArrayList<>();

	@Data
	public static class OneListObject implements Serializable {
		private static final long serialVersionUID = 6828321703061236649L;
		private String text = "";
	}

	public static List<String> getVal(String val) {
		if (StringUtils.isBlank(val)) {
			return null;
		}

		return Arrays.asList(val.split(SEPARATOR));
	}

}
